package com.zhouxiaoge.职责链模式.one;

/**
 * @author 周小哥 gqzmy@163.com 2022/10/8 13:22
 */

public class DeanHandler extends Handler {

    public DeanHandler(String name) {
        super(name);
    }

    @Override
    public void processRequest(ApplyRequest applyRequest) {
        if (applyRequest.getMoney() < 3000) {
            System.out.println("请求 " + applyRequest.getId() + " ,要审批" + applyRequest.getMoney() + ",被" + this.getName() + "处理,通过");
        } else {
            this.getHandler().processRequest(applyRequest);
        }
    }
}
